﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;
using System.Data;

namespace Vcare.Helpers
{
  public class GenericRepository
  {
    public virtual void UploadTps(DateTime DateOfEntry)
    {
      string conxString = System.Configuration.ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString();
      SqlConnection conn = new SqlConnection(conxString);
      SqlCommand cmd = new SqlCommand("dbo.IsDuplicate");
      cmd.Connection = conn;
      cmd.Connection.Open();
      cmd.CommandType = CommandType.Text;
      cmd.CommandText = "exec [dbo].[UploadTPS]";
      cmd.Parameters.AddWithValue("@dateofentry", DateOfEntry);
      cmd.ExecuteNonQuery();
      cmd.Connection.Close();
    }
  }
}